import instance from './fatch'
import qs from 'qs'
//首页数据
export const HomeDataApi = () => instance.get('/index/banners/travel')

// 热门和最新游记
export const ReMenDataApi = (params) => instance.get(`/travels/query?${qs.stringify(params)}`)
// http://kumanxuan1.f3322.net:8809/travels/query?orderType=1&currentPage=1

// 目的地数据
export const DestinationsDataApi = () => instance.get('/destinations/hotRegion')
// http://kumanxuan1.f3322.net:8809/destinations/hotRegion

// 热门目的地各地区
export const ReMenDqDataApi = (params) => instance.get(`/destinations/search?${qs.stringify(params)}`)
// http://kumanxuan1.f3322.net:8809/destinations/search?regionId=-1

// 旅游攻略
export const GongLueDataApi = () => instance.get('/strategies/themes')
// http://kumanxuan1.f3322.net:8809/strategies/themes

// 攻略下方数据
export const GongLueListDataApi = () => instance.get('/strategies/query')
// http://kumanxuan1.f3322.net:8809/strategies/query

//攻略下方每一项数据
export const GongLueItemDataApi = (params) => instance.get(`/strategies/query?${qs.stringify(params)}`)
// http://kumanxuan1.f3322.net:8809/strategies/query?themeId=5e3286e8304b00003b0053d9&currentPage=1

// 旅游日记
export const RiJiDataApi = () => instance.get('/travels/query')
// http://kumanxuan1.f3322.net:8809/travels/query

// 旅游日记选项
// http://kumanxuan1.f3322.net:8809/travels/query?orderType=1&perExpendType=3&dayType=-1&currentPage=1
export const RiJiItemDataApi = (params) => instance.get(`/travels/query?${qs.stringify(params)}`)

// 目的地详情
// http://kumanxuan1.f3322.net:8809/destinations/toasts?destId=5e2ab4f48847000059006e2f
export const MuDiDataApi = (params) => instance.get(`/destinations/toasts?${qs.stringify(params)}`)

// 旅游日记详情
// http://kumanxuan1.f3322.net:8809/travels/detail?id=5e3bf6a93f050000ff0035e2
export const RijiDataApi = (params) => instance.get(`/travels/detail?${qs.stringify(params)}`)